--
-- DESCRIPTION
--
-- @COMPANY **
-- @AUTHOR **
-- @DATE ${date} ${time}
--

---@type AIC_Pig_C
local M = UnLua.Class()

-- function M:Initialize(Initializer)
-- end

-- function M:UserConstructionScript()
-- end

-- function M:ReceiveBeginPlay()
-- end

-- function M:ReceiveEndPlay()
-- end

function M:ReceiveTick(DeltaSeconds)
    if self.Pig and self.Pig.IsDefeated == false then
        self.Pig:AddMovementInput(self.Pig:GetActorForwardVector(), 1, false)
    end
end

-- function M:ReceiveAnyDamage(Damage, DamageType, InstigatedBy, DamageCauser)
-- end

-- function M:ReceiveActorBeginOverlap(OtherActor)
-- end

-- function M:ReceiveActorEndOverlap(OtherActor)
-- end

function M:ReceivePossess(PossessedPawn)
    local PigClass = UE.UClass.Load("/Script/Engine.Blueprint'/TowerClimber/Blueprints/Characters/Pig/BP_Pig.BP_Pig_C'")

    self.Pig = PossessedPawn:Cast(PigClass)

end

return M
